import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split

iris = datasets.load_iris()
data = pd.DataFrame(iris.get('data'), columns=['sepal length', 'petal length', 'sepal width', 'petal width'])
print(data.head())

X_train, x_test, y_train, y_test = train_test_split(
    data.iloc[:, :-1], data['petal width'], test_size=0.33, random_state=42
)
# print(X_train)
# print(y_train)

from sklearn.preprocessing import StandardScaler

scaler = StandardScaler()
# print(data['sepal width'])
scaler.fit(X_train)
print(X_train)
scaler.transform(X_train)
print(X_train)
# scaler.transform(data['sepal width'])
# print(scaler.fit(data['sepal width']))

